def array_flip(source_arr):
    """
    数组翻转
    :param source_arr:
    :return:
    """
    arr_row = len(source_arr)
    arr_col = len(source_arr[0])
    # new_arr = [[0] * arr_row for _ in range(arr_col)]
    new_arr = [[0 for _ in range(arr_row)] for _ in range(arr_col)]
    for i in range(arr_row):
        for j in range(len(source_arr[i])):
            new_arr[j][i] = source_arr[i][j]
    return new_arr


arr = [[1, 2, 3,7], [4, 5, 6]]
print(arr)
print(array_flip(arr))
